module.exports = {
    entry: './src/app.js',
    output: {
        filename: 'bundle.js'
    },
    mode: 'development',
    devServer: {
        publicPath: '/dist'
    },
    module: {
        rules: [
            {
                test: /\.css/, 
                use: {
                    "style-loader": {
                        loader: "css-loader",
                        options: {
                            // css-loader配置项
                        }
                    }
                }
            },
            {
                test: /\.js$/, 
                exclude: /node_modules/,
                use: {
                    loader: 'babel-loader',
                    options: {
                        cacheDirectory: true,
                        presets: [
                            {
                                
                                'env': {
                                    modules: false
                                }
                            
                            }
                        ]
                    }
                }
            }
        ]
    }
}